package org.example.proxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class JDKProxyAop implements InvocationHandler {

    private SumTarget target;

    public JDKProxyAop(SumTarget target) {
        this.target = target;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        return target.invokeMethod(method, args);
    }
}
